<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>考勤机分布管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/zhtj/dispatchclassroom/">考勤机分布列表</a></li>
		<shiro:hasPermission name="zhtj:dispatchclassroom:edit"><li><a href="${ctx}/zhtj/dispatchclassroom/form">考勤机分布添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="dispatchclassroom" action="${ctx}/zhtj/dispatchclassroom/" method="post" class="breadcrumb">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<div class="container-fluid">
		<div class="row">
			<div class="control-label col-xs-1"><label>考勤机IP：</label>
				<form:input path="machineip" htmlEscape="false" maxlength="50" class="form-control input-sm input-medium"/>
			</div>
			<div class="btns col-xs-1" style="float: right"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></div>
		</div>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>考勤机IP</th>
				<th>教室</th>
				<shiro:hasPermission name="zhtj:dispatchclassroom:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="dispatchclassroom">
			<tr>
				<td><a href="${ctx}/zhtj/dispatchclassroom/form?id=${dispatchclassroom.id}">
					${dispatchclassroom.machineip}
				</a></td>
				<td>
					<c:set var="flag" value="true" />
					<c:forEach items="${lists}" var="item">
						<c:if test="${dispatchclassroom.classroomid eq item.id and flag eq true}">
							${fns:getDictLabel(item.carea,"sz_xq" ,"-")}&nbsp;${item.name}
							<c:set var="flag" value="false" />
							<%--<c:set var="exitId" value="1"></c:set>--%>
						</c:if>
					</c:forEach>
				</td>
				<shiro:hasPermission name="zhtj:dispatchclassroom:edit"><td>
    				<a href="${ctx}/zhtj/dispatchclassroom/form?id=${dispatchclassroom.id}">修改</a>
					<a href="${ctx}/zhtj/dispatchclassroom/delete?id=${dispatchclassroom.id}" onclick="return confirmx('确认要删除该考勤机分布吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>